#ifndef __SWEI_OPCODE_H
#define __SWEI_OPCODE_H

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

/* netprotocol模块错误定义 */
#define  NETPROTOCOL_NO_SPACE_SAVE_CMD_OPCODE  1
#define  NETPROTOCOL_NO_NO_CMD_OPCODE          2
#define  NETPROTOCOL_INPUT_NULL                3

/* tbox下行指令和上行应答对应关系(操作码)*/
#pragma pack(1)
typedef struct
{
    uint16_t   cmd_id;           /* 下行的指令ID */
    uint16_t   cmd_opcode;       /* 该指令对应的操作码 */
} NET_PROTOCOL_CMD_OPCODE;
#pragma pack()


int32_t tbox_netprotocol_save_cmd_opcode(uint16_t cmd_id, uint16_t cmd_opcode);
int32_t tbox_netprotocol_get_cmd_opcode(uint16_t cmd_id, uint16_t *p_opcode, char clear_flag);

#ifdef __cplusplus
}
#endif

#endif // __SWEI_OPCODE_H